Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Replace tomcat-jdbc with HikariCP #525

Merged
merged 1 commit into from
Feb 19, 2025
Merged

Conversation

matrei
Copy link
Contributor

@matrei matrei commented Feb 19, 2025

In accordance with the decision in the Grails Stewards Meeting 2024-10-10, this PR
switches the default JDBC connection pool in Grails 7 applications from tomcat-jdbc to HikariCP.

Spring HikariCP configuration Properties: https://docs.spring.io/spring-boot/appendix/application-properties/index.html#application-properties.data.spring.datasource.hikari

Switches the default JDBC connection pool in Grails
applications from `tomcat-jdbc` to `HikariCP`.
@jamesfredley jamesfredley added this to the grails:7.0.0-M2 milestone Feb 19, 2025
@@ -54,24 +54,6 @@ default void applyDefaultConfig(DatabaseDriverFeature dbFeature, Map<String, Obj
config.put(ENVIRONMENTS_KEY + "." + PROD_ENVIRONMENT_KEY + "." + getDbCreateKey(), "none");
Optional.ofNullable(dbFeature.getJdbcProdUrl()).ifPresent(url -> config.put(ENVIRONMENTS_KEY + "." + PROD_ENVIRONMENT_KEY + "." + getUrlKey(), url));

addProductionDataSourceProperties(config, "jmxEnabled", true);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sane defaults are one of the best features of HikariCP!

@matrei matrei merged commit 5e15afd into 7.0.x Feb 19, 2025
9 checks passed
@matrei matrei deleted the matrei/switch-to-hikaricp branch February 19, 2025 17:15
jamesfredley added a commit to grails/grails-profiles that referenced this pull request Feb 26, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

Grails 7, switch from tomcat-jdbc to HikariCP database connection pooling, by default
3 participants